import Vue from 'vue';
import Router from 'vue-router';

const loginPage = resolve => require(['@/page/common/login-page'], resolve)
const rechargePassword = resolve => require(['@/page/common/recharge-password'], resolve)
const userList = resolve => require(['@/page/userManage/userList'], resolve)
const wordList = resolve => require(['@/page/wordsManage/wordList'], resolve)
const wordDetail = resolve => require(['@/page/wordsManage/wordDetail'], resolve)
const wordEdit = resolve => require(['@/page/wordsManage/wordEdit'], resolve)
const roleList = resolve => require(['@/page/systemManage/roleList'], resolve)
const roleEdit = resolve => require(['@/page/systemManage/roleEdit'], resolve)
const accountList = resolve => require(['@/page/systemManage/accountList'], resolve)
const accountEdit = resolve => require(['@/page/systemManage/accountEdit'], resolve)
const statistics = resolve => require(['@/page/statistics/index'], resolve)
const bannerList = resolve => require(['@/page/bannerManage/bannerList'], resolve)
const bannerEdit = resolve => require(['@/page/bannerManage/bannerEdit'], resolve)
const introduce = resolve => require(['@/page/userManage/introduce'], resolve)
const telInfo = resolve => require(['@/page/userManage/telInfo'], resolve)
const question = resolve => require(['@/page/userManage/question'], resolve)



const houseClassify = resolve => require(['@/page/houseManage/houseClassify'], resolve)
const houseEdit = resolve => require(['@/page/houseManage/houseEdit'], resolve)
const houseList = resolve => require(['@/page/houseManage/houseList'], resolve)
const roomEdit = resolve => require(['@/page/houseManage/roomEdit'], resolve)
const roomList = resolve => require(['@/page/houseManage/roomList'], resolve)
const roomDetail = resolve => require(['@/page/houseManage/roomDetail'], resolve)
const orderConsult = resolve => require(['@/page/orderManage/orderConsult'], resolve)
const orderHouse = resolve => require(['@/page/orderManage/orderHouse'], resolve)
const recommendDetail = resolve => require(['@/page/recommendManage/recommendDetail'], resolve)
const recommendList = resolve => require(['@/page/recommendManage/recommendList'], resolve)
const recommendRule = resolve => require(['@/page/recommendManage/recommendRule'], resolve)
const settingQuestion = resolve => require(['@/page/settingManage/settingQuestion'], resolve)
const settingTel = resolve => require(['@/page/settingManage/settingTel'], resolve)
const signEdit = resolve => require(['@/page/signManage/signEdit'], resolve)
const signList = resolve => require(['@/page/signManage/signList'], resolve)

Vue.use(Router)
export default new Router({
  mode: 'history',
  base: '/sys/',
  routes: [
    {
      path: '/loginPage',
      name: 'loginPage',
      component: loginPage
    },
    {
      path: '/rechargePassword',
      name: 'rechargePassword',
      component: rechargePassword
    },
    {
      path: '/userList',
      name: 'userList',
      component: userList
    },
    {
      path: '/wordList',
      name: 'wordList',
      component: wordList
    },
    {
      path: '/wordDetail',
      name: 'wordDetail',
      component: wordDetail
    },
    {
      path: '/wordEdit',
      name: 'wordEdit',
      component: wordEdit
    },
    {
      path: '/roleList',
      name: 'roleList',
      component: roleList
    },
    {
      path: '/roleEdit',
      name: 'roleEdit',
      component: roleEdit
    },
    {
      path: '/accountList',
      name: 'accountList',
      component: accountList
    },
    {
      path: '/accountEdit',
      name: 'accountEdit',
      component: accountEdit
    },
    {
      path: '/',
      name: 'statistics',
      component: statistics
    },
    {
      path: '/bannerList',
      name: 'bannerList',
      component: bannerList
    },
    {
      path: '/bannerEdit',
      name: 'bannerEdit',
      component: bannerEdit
    },
    {
      path: '/introduce',
      name: 'introduce',
      component: introduce
    },
    {
      path: '/houseClassify',
      name: 'houseClassify',
      component: houseClassify
    },
    {
      path: '/houseEdit',
      name: 'houseEdit',
      component: houseEdit
    },
    {
      path: '/houseList',
      name: 'houseList',
      component: houseList
    },
    {
      path: '/roomEdit',
      name: 'roomEdit',
      component: roomEdit
    },
    {
      path: '/roomList',
      name: 'roomList',
      component: roomList
    },
    {
      path: '/roomDetail',
      name: 'roomDetail',
      component: roomDetail
    },
    {
      path: '/orderConsult',
      name: 'orderConsult',
      component: orderConsult
    },
    {
      path: '/orderHouse',
      name: 'orderHouse',
      component: orderHouse
    },
    {
      path: '/recommendDetail',
      name: 'recommendDetail',
      component: recommendDetail
    },
    {
      path: '/recommendList',
      name: 'recommendList',
      component: recommendList
    },
    {
      path: '/recommendRule',
      name: 'recommendRule',
      component: recommendRule
    },
    {
      path: '/settingQuestion',
      name: 'settingQuestion',
      component: settingQuestion
    },
    {
      path: '/settingTel',
      name: 'settingTel',
      component: settingTel
    },
    {
      path: '/signEdit',
      name: 'signEdit',
      component: signEdit
    },
    {
      path: '/signList',
      name: 'signList',
      component: signList
    },
    {
      path: '/question',
      name: 'question',
      component: question
    },
    {
      path: '/telInfo',
      name: 'telInfo',
      component: telInfo
    },
  ]
})
